import style from "./index.module.scss";
import { cookies } from "next/headers";
import { getResumes } from "@/service";
import CvList from "./cvlist";
export default async function Home() {
  const cookie = cookies().get("baijie_token");
  const templates = await getResumes({ token: cookie?.value });
  let resumes = [];
  if (templates.code === 200) {
    resumes = templates.data;
  }

  return (
    <div className={style.cvs}>
      <div className={style.cvHead}>我的简历</div>
      <CvList resumes={resumes}></CvList>
    </div>
  );
}
